The factorial is normally used in Combinations and Permutations (mathematics).
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication28
{
class Program
{
static void Main(string[] args)
{
int i, fact = 1, number;
Console.Write(" Enter any Number: ");
number = int.Parse(Console.ReadLine());
for (i = 1; i <= number; i++)
{
fact = fact * i;
}
Console.Write("\n Factorial of " + number + " is: " + fact);
Console.WriteLine("\n");
}
}
}
Thank You...!!
Liked By
Write Answer
What is a Factorial program in C#
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
Anonymous User
26-Nov-2018Factorial program in c#...
The factorial is normally used in Combinations and Permutations (mathematics).
Thank You...!!